<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
	<%@ page import="java.io.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>My Video Library</title>
<link rel="stylesheet" href="../LibraryCSS/style.css" type="text/css" />
</head>
<script>
function file(){
	<%
	String absolutePath = request.getServletContext().getRealPath("/");
	System.out.println("file absolute path in file upload servelet" + absolutePath);
	%>	
}
</script>
<%
	String usertype = "";
	if (session != null) {
		usertype = (String) session.getAttribute("userpref");
		System.out.println("UserPref in bulkupload jsp" + usertype);
		usertype = "true_3";
		System.out.println("UserPref in bulkupload jsp" + usertype);

	}
%>
<script>
	function hideDiv() {
		//alert("hi.....................");
		document.getElementById("single_movie_details").style.display = 'none';
		document.getElementById("bulk_upload").style.display = 'block';

	}
</script>
<style>
.movie_div {
	padding-left: 480px;
	padding-top: 40px;
	display: block;
}

.movie_div2 {
	padding-left: 480px;
	padding-top: 40px;
	display: none;
}

table.movie {
	width: 580px;
	background-color: #fafafa;
	border: 1px #000000 solid;
	border-collapse: collapse;
	border-spacing: 0px;
}

td.movie_det {
	background-color: #99CCCC;
	border: 1px #000000 solid;
	font-family: Verdana;
	font-weight: bold;
	font-size: 18px;
	color: #404040;
}

td.movie_cnct {
	border-bottom: 1px #6699CC dotted;
	text-align: left;
	font-family: Verdana, sans-serif, Arial;
	font-weight: normal;
	font-size: .7em;
	color: #404040;
	background-color: #fafafa;
	padding-top: 4px;
	padding-bottom: 4px;
	padding-left: 8px;
	padding-right: 0px;
}
</style>





<body
	style="background: url(../LibraryIMG/background.jpg) repeat-x scroll left top transparent;">
	<div>
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td width="10%"><img src="../LibraryIMG/movietape.jpg"
					width="125" height="167" /></td>
				<td align="center" width="90%"><Font COLOR=WHITE
					FACE="WildWest" SIZE=10>My Video Library</Font></td>
			</tr>
		</table>
	</div>

	<!-- header ends-->

	<nav>
	<ul class="fancyNav">
		<li id="home"><a href="../LibraryJSP/Login.jsp" class="homeIcon">Home</a></li>
		<li id="art"><a href="#">Art and Culture</a></li>
		<li id="cinema"><a href="../LibraryJSP/Login.jsp">Cinema</a></li>
		<li id="history"><a href="#">History</a></li>
		<li id="sports"><a href="#">Sports</a></li>
		<li id="music"><a href="#">Music and dance</a></li>
		<li id="science"><a href="#">Science and Health</a></li>
		<li id="tourism"><a href="#">Tourism</a></li>
		<li id="contact"><a href="#">Contact us</a></li>
		<li id="login"><a href="#" class="loginIcon">Login</a></li>
	</ul>
	</nav>

	<div id="single_movie_details" class="movie_div">
		<table class="movie" cellspacing="0" summary="movie template">
			<tr>
				<td class="movie_det" colspan="3">Movie Details</td>
			</tr>
			<tr>
				<td><img src="../LibraryIMG/Movie_poster_i_robot.jpg" /></td>
				<td class="movie_cnct"><form>
						<table>
							<tr>
								<td>Movie Name :</td>
								<%
									if (!(usertype.equals("true_3"))) {
								%>
								<td><input name="movie_name" value="" type="text"
									readonly="readonly" /></td>
								<%
									} else {
								%>
								<td><input name="movie_name" value="" type="text" /></td>
								<%
									}
								%>
							</tr>
							<tr>
								<td>Movie Type :</td>
								<%
									if (!(usertype.equals("true_3"))) {
								%>
								<td><input name="movie_type" value="" type="text"
									readonly="readonly" /></td>
								<%
									} else {
								%>
								<td><input name="movie_type" value="" type="text" /></td>
								<%
									}
								%>
							</tr>
							<tr>
								<td>Movie Production :</td>
								<%
									if (!(usertype.equals("true_3"))) {
								%>
								<td><input name="movie_production" value="" type="text"
									readonly="readonly" /></td>
								<%
									} else {
								%>
								<td><input name="movie_production" value="" type="text" /></td>
								<%
									}
								%>
							</tr>
							<tr>
								<td>Movie Release Date :</td>
								<%
									if (!(usertype.equals("true_3"))) {
								%>
								<td><input name="movie_rd" value="" type="text"
									readonly="readonly" /></td>
								<%
									} else {
								%>
								<td><input name="movie_rd" value="" type="text" /></td>
								<%
									}
								%>
							</tr>
							<tr>
								<td>Movie Total Copies :</td>
								<%
									if (!(usertype.equals("true_3"))) {
								%>
								<td><input name="movie_ac" value="" type="text"
									readonly="readonly" /></td>
								<%
									} else {
								%>
								<td><input name="movie_ac" value="" type="text" /></td>
								<%
									}
								%>
							</tr>
							<%
								if ((usertype.equals("true_3"))) {
							%>
							<tr>
								<td colspan="2" align="center"><input type="image"
									src="../LibraryIMG/button_submit_orange.jpg" alt="submit"
									title="submit" onclick="" /></td>
								<%
									} else {
								%>
							
							<tr>
								<td align="center"><input type="image"
									src="../LibraryIMG/AddToCartButton.png" alt="submit"
									title="submit" onclick="" /></td>
								<%
									}
								%>
							</tr>
						</table>
					</form></td>
			</tr>
			<%
				if ((usertype.equals("true_3"))) {
			%>
			<tr>


				<td class="movie_det" colspan="3" align="center"><input
					type="image" src="../LibraryIMG/button_submit_orange.jpg"
					alt="submit" title="submit" onclick="javascript:hideDiv();" /></td>

			</tr>
			<%} %>
		</table>
		.
	</div>
	<div id="bulk_upload" class="movie_div2">
	<form name = "file_upload" method="post" action = "UserMovieDisplay" enctype="multipart/form-data">
			<table class="movie" cellspacing="0" summary="movie template">
			<tr>
				<td class="movie_det" colspan="3">Bulk Upload Movie Details</td>
			</tr>
			<tr>
				<td align="right"><FONT color="#FF0000">* </FONT>File
					Description&nbsp;</td>
				<td><input type = "text" name = "movie_des"/></td>
			</tr>

			<tr class="bgwhite">
				<td align="right"><FONT color="#FF0000">* </FONT>File Details&nbsp;</td>
				<td><input type = "file" name = "file1" /></td>
			</tr>
			<tr><td><input
					type="submit" value = "Insert" 
					alt="insert" title="insert" onclick="" /></td>
					
			<td><input
					type="submit" value = "Insert/Update" 
					alt="submit" title="insert/update" onclick="submit" /></td>
					</tr>
		</table>
		</form>
		
	</div>
</body>
</html>